home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / HPACK78S.ZIP / makefile.os2 < prev    next >
Makefile  |  1992-12-02  |  10KB  |  261 lines

  1. #****************************************************************************
  2. #*                                                                            *
  3. #*            Makefile for the OS/2 version of the HPACK archiver                *
  4. #*                                                                            *
  5. #****************************************************************************
  6.  
  7. # The OS and OS mutation we are compiling under.  Currently handled (but
  8. # not necessarily by this makefile) types are __AMIGA__, __ATARI__, __MAC__,
  9. # __MSDOS__, __OS2__(TOPSPEED, 32BIT), __UNIX__ (AIX, AIX370, AIX386, GENERIC,
  10. # IRIX, ISC, LINUX, POSIX, SUNOS, SVR4, ULTRIX, ULTRIX_OLD).  Partially
  11. # handled types are __ATARI__, __IIGS__, __VMS__.
  12.  
  13. OS            = -D__OS2__
  14.  
  15. # The various system-dependant defines from above:
  16.  
  17. DEFINES        = $(OS)
  18.  
  19. # 32bit: Use gcc
  20. #        gcc 2.2.2 - Max Nilson, Max_Nilson@kcbbs.gen.nz
  21. #        emx - John Burnell, johnb@maths.grace.cri.nz
  22. # microsoft: Microsoft C (not fully tested)
  23. #        Microsoft C 7.0 - Chris Sullivan
  24. # topspeed: TopSpeed C (NB should use the TopSpeed better-make, not this makefile)
  25. #        TopSpeed C - John Burnell, johnb@maths.grace.cri.nz
  26. # watcom: Watcom C (not fully tested)
  27. # zortech: Zortech C
  28. #        Zortech C - Chris Sullivan
  29.  
  30. PROJ    = hpack
  31.  
  32. CFLAGS    = -c $(DEFINES) -O $(DEBUG) -I. $(CMDC)    # Flags for compiler
  33.  
  34. LFLAGS    = -o $(PROJ) $(DEBUG) $(CMDL)            # Flags for linker
  35.  
  36. OUTPATH    =                    # Where object files go (/tmp is a good place)
  37. OBJ        = .o                # Extension for object files
  38. EXE        = .exe                # Extension for executables
  39.  
  40. LD        = $(CC)                # Linker (just use the C compiler)
  41. LS        = dir                # Directory command
  42. ECHO    = echo                # Echo to screen command
  43. MAKE    = dmake                # The make command
  44.  
  45. EMXBINDIR = d:\emx\bin        # Where EMX stuff lives
  46.  
  47. #****************************************************************************
  48. #*                                                                            *
  49. #*            If no args are given, print a usage message and exit            *
  50. #*                                                                            *
  51. #****************************************************************************
  52.  
  53. default:
  54.         @$(ECHO) off
  55.         @$(ECHO) .
  56.         @$(ECHO) You have to enter the OS/2 compiler you want to build HPACK with.
  57.         @$(ECHO) Possible options are: 32bit, microsoft, topspeed, watcom, and zortech.
  58.         @$(ECHO) If you want to use another compiler, edit the makefile to accomodate it
  59.         @$(ECHO) and send a copy of any changes necessary to the author.
  60.  
  61. love:
  62.         @$(ECHO) off
  63.         @$(ECHO) Nicht wahr?
  64.         @$(ECHO) .
  65.  
  66. #****************************************************************************
  67. #*                                                                            *
  68. #*                                Rules to build HPACK                        *
  69. #*                                                                            *
  70. #****************************************************************************
  71.  
  72. $(OUTPATH)arcdir$(OBJ):        arcdir.h defs.h error.h flags.h hpacklib.h \
  73.                             system.h tags.h io/fastio.h arcdir.c
  74.                             $(CC) $(CFLAGS) arcdir.c
  75.  
  76. $(OUTPATH)arcdirio$(OBJ):    arcdir.h filehdr.h choice.h defs.h error.h \
  77.                             hpacklib.h flags.h system.h crc/crc16.h \
  78.                             crypt/crypt.h io/fastio.h io/hpackio.h \
  79.                             store/store.h arcdirio.c
  80.                             $(CC) $(CFLAGS) -DARCHIVE_TYPE=3 arcdirio.c
  81.  
  82. $(OUTPATH)archive$(OBJ):    arcdir.h filehdr.h choice.h defs.h error.h \
  83.                             filesys.h flags.h frontend.h hpacklib.h system.h \
  84.                             tags.h crypt/crypt.h io/fastio.h io/hpackio.h \
  85.                             store/store.h archive.c
  86.                             $(CC) $(CFLAGS) archive.c
  87.  
  88. $(OUTPATH)cli$(OBJ):        arcdir.h choice.h defs.h error.h filesys.h \
  89.                             flags.h frontend.h hpacklib.h language/hpaktext.h \
  90.                             system.h wildcard.h crypt/crypt.h io/fastio.h \
  91.                             cli.c
  92.                             $(CC) $(CFLAGS) cli.c
  93.  
  94.  
  95. $(OUTPATH)error$(OBJ):        arcdir.h defs.h filehdr.h error.h errorlvl.h \
  96.                             flags.h frontend.h hpacklib.h system.h \
  97.                             crypt/crypt.h io/fastio.h io/hpackio.h \
  98.                             store/store.h error.c
  99.                             $(CC) $(CFLAGS) error.c
  100.  
  101. $(OUTPATH)filesys$(OBJ):    arcdir.h defs.h filehdr.h error.h flags.h \
  102.                             frontend.h hpacklib.h system.h tags.h io/fastio.h \
  103.                             io/hpackio.h filesys.c
  104.                             $(CC) $(CFLAGS) filesys.c
  105.  
  106. $(OUTPATH)frontend$(OBJ):    arcdir.h filehdr.h choice.h defs.h error.h \
  107.                             filesys.h flags.h frontend.h hpacklib.h system.h \
  108.                             tags.h wildcard.h crypt/crypt.h io/fastio.h \
  109.                             io/hpackio.h store/store.h frontend.c
  110.                             $(CC) $(CFLAGS) frontend.c
  111.  
  112. $(OUTPATH)script$(OBJ):        arcdir.h choice.h defs.h error.h filesys.h \
  113.                             flags.h frontend.h hpacklib.h \
  114.                             language/hpaktext.h system.h wildcard.h \
  115.                             io/fastio.h io/hpackio.h
  116.                             $(CC) $(CFLAGS) script.c
  117.  
  118. $(OUTPATH)tags$(OBJ):        defs.h error.h hpacklib.h system.h tags.h \
  119.                             io/fastio.h tags.c
  120.                             $(CC) $(CFLAGS) tags.c
  121.  
  122. $(OUTPATH)os2$(OBJ):        defs.h arcdir.h frontend.h system.h wildcard.h \
  123.                             hpacklib.h crc/crc16.h io/fastio.h os2.c
  124.                             $(CC) $(CFLAGS) os2.c
  125.  
  126. $(OUTPATH)viewfile$(OBJ):    arcdir.h choice.h defs.h error.h filehdr.h \
  127.                             flags.h frontend.h hpacklib.h \
  128.                             language/hpaktext.h system.h tags.h wildcard.h \
  129.                             io/fastio.h io/hpackio.h viewfile.c
  130.                             $(CC) $(CFLAGS) viewfile.c
  131.  
  132. $(OUTPATH)wildcard$(OBJ):    defs.h error.h system.h wildcard.h wildcard.c
  133.                             $(CC) $(CFLAGS) wildcard.c
  134.  
  135. $(OUTPATH)crc16$(OBJ):        defs.h crc/crc16.c
  136.                             $(CC) $(CFLAGS) crc/crc16.c
  137.  
  138. $(OUTPATH)crypt$(OBJ):        arcdir.h choice.h defs.h error.h hpacklib.h \
  139.                             filesys.h flags.h frontend.h system.h \
  140.                             crypt/crypt.h crypt/md5.h crypt/mdc.h \
  141.                             crypt/packet.h crypt/rsa.h io/fastio.h \
  142.                             io/hpackio.h crypt/crypt.c
  143.                             $(CC) $(CFLAGS) crypt/crypt.c
  144.  
  145. $(OUTPATH)md5$(OBJ):        defs.h crypt/md5.h crypt/md5.c
  146.                             $(CC) $(CFLAGS) crypt/md5.c
  147.  
  148. $(OUTPATH)mdc$(OBJ):        defs.h error.h hpacklib.h crypt/crypt.h \
  149.                             crypt/mdc.h crypt/mdc.c
  150.                             $(CC) $(CFLAGS) crypt/mdc.c
  151.  
  152. $(OUTPATH)rsa$(OBJ):        defs.h crypt/rsa.h crypt/rsa.c
  153.                             $(CC) $(CFLAGS) crypt/rsa.c
  154.  
  155. $(OUTPATH)display$(OBJ):    defs.h frontend.h hpacklib.h io/display.c
  156.                             $(CC) $(CFLAGS) io/display.c
  157.  
  158. $(OUTPATH)fastio$(OBJ):        arcdir.h defs.h error.h flags.h frontend.h \
  159.                             hpacklib.h system.h crc/crc16.h crypt/crypt.h \
  160.                             data/ebcdic.h io/fastio.h io/hpackio.h \
  161.                             io/fastio.c
  162.                             $(CC) $(CFLAGS) io/fastio.c
  163.  
  164. $(OUTPATH)hpaktext$(OBJ):    defs.h error.h errorlvl.h language/hpaktext.c
  165.                             $(CC) $(CFLAGS) language/hpaktext.c
  166.  
  167. $(OUTPATH)lza$(OBJ):        defs.h choice.h error.h flags.h hpacklib.h system.h \
  168.                             crc/crc16.h crypt/crypt.h io/fastio.h \
  169.                             io/hpackio.h lza/model.h lza/model2.h lza/model3.h \
  170.                             lza/model4.h lza/lza.c
  171.                             $(CC) $(CFLAGS) lza/lza.c
  172.  
  173. $(OUTPATH)model$(OBJ):        defs.h error.h flags.h hpacklib.h io/hpackio.h \
  174.                             lza/model.h lza/model.c
  175.                             $(CC) $(CFLAGS) lza/model.c
  176.  
  177. $(OUTPATH)model2$(OBJ):        defs.h lza/model2.h lza/model2.c
  178.                             $(CC) $(CFLAGS) lza/model2.c
  179.  
  180. $(OUTPATH)model3$(OBJ):        defs.h lza/model3.h lza/model3.c
  181.                             $(CC) $(CFLAGS) lza/model3.c
  182.  
  183. $(OUTPATH)model4$(OBJ):        defs.h lza/model4.h lza/model4.c
  184.                             $(CC) $(CFLAGS) lza/model4.c
  185.  
  186. $(OUTPATH)pack$(OBJ):        defs.h io/hpackio.h io/fastio.h lza/pack.c
  187.                             $(CC) $(CFLAGS) lza/pack.c
  188.  
  189. $(OUTPATH)unpack$(OBJ):        defs.h crc/crc16.h io/hpackio.h io/fastio.h \
  190.                             lza/model.h lza/unpack.c
  191.                             $(CC) $(CFLAGS) lza/unpack.c
  192.  
  193. $(OUTPATH)store$(OBJ):        defs.h error.h hpacklib.h system.h crc/crc16.h \
  194.                             crypt/crypt.h io/fastio.h io/hpackio.h \
  195.                             store/store.h store/store.c
  196.                             $(CC) $(CFLAGS) store/store.c
  197.  
  198. # Note: The following two rules are for emx - not sure what other compilers
  199. # will use (the standard 32-bit version is compiled with emx).
  200.  
  201. $(PROJ):    $(OUTPATH)arcdir$(OBJ) $(OUTPATH)arcdirio$(OBJ) \
  202.             $(OUTPATH)archive$(OBJ) $(OUTPATH)cli$(OBJ) \
  203.             $(OUTPATH)display$(OBJ) $(OUTPATH)error$(OBJ) \
  204.             $(OUTPATH)fastio$(OBJ) $(OUTPATH)filesys$(OBJ) \
  205.             $(OUTPATH)frontend$(OBJ) $(OUTPATH)hpaktext$(OBJ) \
  206.             $(OUTPATH)script$(OBJ) $(OUTPATH)tags$(OBJ) \
  207.             $(OUTPATH)viewfile$(OBJ) $(OUTPATH)wildcard$(OBJ) \
  208.             $(OUTPATH)crc16$(OBJ) $(OUTPATH)crypt$(OBJ) $(OUTPATH)md5$(OBJ) \
  209.             $(OUTPATH)mdc$(OBJ) $(OUTPATH)rsa$(OBJ) $(OUTPATH)os2$(OBJ) \
  210.             $(OUTPATH)lza$(OBJ) $(OUTPATH)model$(OBJ) $(OUTPATH)model2$(OBJ) \
  211.             $(OUTPATH)model3$(OBJ) $(OUTPATH)model4$(OBJ) \
  212.             $(OUTPATH)pack$(OBJ) $(OUTPATH)unpack$(OBJ) $(OUTPATH)store$(OBJ)
  213.         $(LD) $(OUTPATH)arcdir$(OBJ) $(OUTPATH)arcdirio$(OBJ) \
  214.         $(OUTPATH)archive$(OBJ) $(OUTPATH)cli$(OBJ) $(OUTPATH)display$(OBJ) \
  215.         $(OUTPATH)error$(OBJ) $(OUTPATH)fastio$(OBJ) $(OUTPATH)filesys$(OBJ) \
  216.         $(OUTPATH)frontend$(OBJ) $(OUTPATH)hpaktext$(OBJ) \
  217.         $(OUTPATH)script$(OBJ) $(OUTPATH)tags$(OBJ) $(OUTPATH)viewfile$(OBJ) \
  218.         $(OUTPATH)wildcard$(OBJ) $(OUTPATH)crc16$(OBJ) $(OUTPATH)crypt$(OBJ) \
  219.         $(OUTPATH)md5$(OBJ) $(OUTPATH)mdc$(OBJ) $(OUTPATH)rsa$(OBJ) \
  220.         $(OUTPATH)os2$(OBJ) $(OUTPATH)store$(OBJ) $(OUTPATH)lza$(OBJ) \
  221.         $(OUTPATH)model$(OBJ) $(OUTPATH)model2$(OBJ) $(OUTPATH)model3$(OBJ) \
  222.         $(OUTPATH)model4$(OBJ) $(OUTPATH)pack$(OBJ) $(OUTPATH)unpack$(OBJ) \
  223.         $(LFLAGS)
  224.  
  225. $(PROJ)$(EXE):    $(PROJ)
  226.         $(EMXBINDIR)\emxbind $(EMXBINDIR)\emxl.exe $(PROJ) $(PROJ)$(EXE) -s32000
  227. # I am not sure what to make the stack (-s32000)
  228.  
  229. #****************************************************************************
  230. #*                                                                            *
  231. #*                    Defines for each compiler/OS variation                    *
  232. #*                                                                            *
  233. #****************************************************************************
  234.  
  235. # Generic 32-bit version: Use gcc/emx
  236.  
  237. 32bit:
  238.         @$(MAKE) -f makefile.os2 hpack.exe CC="gcc" CMDC="-DOS2_32 -D__GCC__" \
  239.                  CMDL="-los2 -v"
  240.  
  241. # Microsoft C: Use cl
  242.  
  243. microsoft:
  244.         @$(MAKE) hpack.exe CC=cl CMDC=-ml
  245.  
  246. # TopSpeed C: Use tsc (NB should use the TopSpeed better-make, not this
  247. #              makefile).
  248.  
  249. topspeed:
  250.         @$(MAKE) hpack.exe CC=tsc
  251.  
  252. # Watcom C: Use wc (Ba-woosh!)
  253.  
  254. watcom:
  255.         @$(MAKE) hpack.exe CC=wc
  256.  
  257. # Zortech C: Use zcc, -Ju to ignore signed/unsigned chars
  258.  
  259. zortech:
  260.         @$(MAKE) hpack.exe CC="ztc" CMDC="-Ju -ml"
  261.